<?php

defined('_JEXEC') or die('Restricted access');

$document = &JFactory::getDocument();

$imagesList = $this->images;

?>

<h1>Images review</h1>


<?php

$data_dir = JURI::root().'components'.DS.'com_geophoto'.DS.'data'.DS;

$removeFormHead = '<center><form action="index.php?option=com_geophoto&controller=admin&task=confirm" method="POST"><table>';

$removeFormFoot = '<center><input type="submit" value="Delete selected" ></form></center>';


if(count($imagesList) == 0) {

    echo '<b>The database contains no images.</b>';

}else {

    echo $removeFormHead;

	foreach ($imagesList as $i => $image) {

    	echo '<img src="'.$data_dir.$image["name"].'" width="200" />';
    	echo '<input type="checkbox" name="ids[]" value="'.$image["id"].'" />';

    }

    echo $removeFormFoot;
}

?>